class Olive3rdCamera extends GameThirdPersonCamera;

function FixCameraRotTo45(Pawn P, GamePlayerCamera CameraActor, float DeltaTime, out TViewTarget OutVT)
{
//	ViewRotation.Pitch = (-45.f * DegToRad) * RadToUnrRot;
//	ViewRotation.Yaw = (-45.f * DegToRad) * RadToUnrRot;
	OutVT.POV.Rotation.Pitch = (-45.f * DegToRad) * RadToUnrRot;
	OutVT.POV.Rotation.Yaw = (-45.f * DegToRad) * RadToUnrRot;
}

function UpdateCamera(Pawn P, GamePlayerCamera CameraActor, float DeltaTime, out TViewTarget OutVT)
{
	if( P == None && OutVT.Target != None )
	{
		OutVT.Target.GetActorEyesViewPoint( OutVT.POV.Location, OutVT.POV.Rotation );
		PlayerCamera.ApplyCameraModifiers(DeltaTime, OutVT.POV);
	}
	// give pawn chance to hijack the camera and do it's own thing.
	else if( (P != None) && P.CalcCamera(DeltaTime, OutVT.POV.Location, OutVT.POV.Rotation, OutVT.POV.FOV) )
	{
		//@fixme, move this call up into GearPlayerCamera??? look into it.
		PlayerCamera.ApplyCameraModifiers(DeltaTime, OutVT.POV);
		return;
	}
	else
	{
		UpdateCameraMode(P);
		if( CurrentCamMode != None )
		{
			FixCameraRotTo45(P, CameraActor, DeltaTime, OutVT);
			//PlayerUpdateCamera(P,CameraActor, DeltaTime, OutVT);
			CurrentCamMode.UpdatePostProcess(OutVT, DeltaTime);
		}
		else
		{
			`warn(GetFuncName() @ "CameraMode == None!!!");	
		}
		// prints local space camera offset (from pawnloc).  useful for determining camera anim test offsets
		//`log("***"@((OutVT.POV.Location - P.Location) << P.Controller.Rotation));
	}

	// if we had to reset camera interpolation, then turn off flag once it's been processed.
	bResetCameraInterpolation = FALSE;
}

DefaultProperties
{
	ThirdPersonCamDefaultClass=class'Olive3rdCameraMode_Default'
}
